/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.core.profiles;

import org.eclipse.swt.graphics.Image;

import com.cea.papyrus.profile.ImageManager;
import com.cea.papyrus.profile.tree.ProfileElementLabelProvider;
import com.cea.papyrus.profile.tree.objects.TreeObject;

// TODO: Auto-generated Javadoc
/**
 * The Class ProfileElementWithDisplayLabelProvider.
 */
public class ProfileElementWithDisplayLabelProvider extends
		ProfileElementLabelProvider {

	/**
	 * Gets the image.
	 * 
	 * @param object the object
	 * 
	 * @return the image
	 */
	@Override
	public Image getImage(Object object) {
		
		if (object instanceof TreeObject) {
			
			TreeObject to = (TreeObject) object;
			if (to.isDisplay()) {
				return ImageManager.IMG_STEREOTYPEDISPLAYED;
			}
		}
		
		// else, Default case : no display
		return super.getImage(object);
	}
}
